import http from "/@ts/axios";
import formatTool from "/@ts/hooks/format";
const { parseStrEmpty } = formatTool();

//列表
export function RecipeCategorylist(query: any) {
  return http.request({
    url: "/recipe/categoryList",
    method: "post",
    data: query,
  });
}

// 查询详细
export function getRecipeCategoryInfo(userId?: string) {
  return http.request({
    url: "/recipe/category/" + parseStrEmpty(userId),
    method: "get",
  });
}

// 新增
export function addRecipeCategory(data: any) {
  return http.request({
    url: "/recipe/categoryadd",
    method: "post",
    data: data,
  });
}

// 修改
export function updatRecipeCategory(data: any) {
  return http.request({
    url: "/recipe/categoryupData",
    method: "POST",
    data: data,
  });
}

// 删除
export function deletes(Ids: string) {
  return http.request({
    url: "/recipe/category/" + Ids,
    method: "delete",
  });
}





